<%@ page contentType="text/html;charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<% 
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>大连开发区健身中心</title>
		<link type="text/css" rel="stylesheet" href="<%=path %>/admin/styles/default.css" />
		<script type="text/javascript" src="<%=path %>/res/js/jquery.js"></script>
		<script type="text/javascript" src="<%=path %>/res/js/common.js"></script>
		<script type="text/javascript" src="<%=path %>/admin/pages/theme/js/themeInput.js"></script>
	</head>
	<body>
		<form name="form1" method="post" enctype="multipart/form-data" action="">
		<input type="hidden" id="message" value="${message}"/>
		<input type="hidden" id="webPath" value="<%=path %>"/>
		<input type="hidden" id="method" value="<s:property value="#request.method"/>"/>
		<input type="hidden" id="themeId" name="themeBean.themeId" value="<s:property value="themeBean.themeId"/>"/>
		<input type="hidden" value="<s:property value="themeBean.thLogo"/>" id="thLogo" name="themeBean.thLogo" />
		<input type="hidden" value="<s:property value="themeBean.thBgImg"/>" id="msgCover" name="themeBean.thBgImg" />
		<table id="table-data-outter">
			<tr>
				<td>
					<table id="table-data-inner" cellspacing="1">
						<tr id="tr-menu-path">
							<td colspan="5" nowrap="nowrap">
								<fieldset id="f-menu-path">当前位置:&nbsp;模板管理 &gt; 模板定制</fieldset>
								<fieldset id="f-condition-display">
										<img src="<%=path%>/admin/images/main/display_on.gif" onclick="displayCondition(this,'tr-menu-path')" 
											align="bottom" width="17" height="15" alt="隐藏查询条件" /></fieldset>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="20%" class="field-title">模板名称: </td>
							<td width="30%" class="field-content">
								<input type="text" id="thName" name="themeBean.thName" value="<s:property value="themeBean.thName"/>" style="width:150px;"/>
								<span class="font_red">*</span>
							</td>
							<td width="20%" class="field-title">模板备注: </td>
							<td width="30%" class="field-content">
								<input type="text" name="themeBean.remark" value="<s:property value="themeBean.remark"/>" style="width:150px;"/>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="20%" class="field-title">页面布局: </td>
							<td width="30%" class="field-content">
								
								
								<select name="themeBean.thLayout" style="width:155px;" <s:if test='#request.method == "update"'>disabled="disabled"</s:if>>
									<s:iterator value="codeList" status="index">
									<s:if test='themeCode == "010"'>
									<option value="<s:property value="themeKey"/>" <s:if test='themeBean.thLayout == themeKey'>selected="selected"</s:if>>
										<s:property value="themeValue"/>
									</option>
									</s:if>
									</s:iterator>
								</select>
							</td>
							<td width="20%" class="field-title">页面样式: </td>
							<td width="30%" class="field-content">
								<select name="themeBean.thStyle" style="width:155px;">
									<s:iterator value="codeList" status="index">
									<s:if test='themeCode == "020"'>
									<option value="<s:property value="themeKey"/>" <s:if test='themeBean.thStyle == themeKey'>selected="selected"</s:if>>
										<s:property value="themeValue"/>
									</option>
									</s:if>
									</s:iterator>
								</select>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="20%" class="field-title">网站标题: </td>
							<td width="30%" class="field-content">
								<input type="text" name="themeBean.thSiteTitle" value="<s:property value="themeBean.thSiteTitle"/>" style="width:150px;"/>
							</td>
							<td width="20%" class="field-title">网站背景色: </td>
							<td width="30%" class="field-content">
								<input type="text" name="themeBean.thBgColor" value="<s:property value="themeBean.thBgColor"/>" style="width:150px;"/>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">网站标识图: </td>
							<td width="85%" class="field-content" colspan="3">
								<input type="file" name="logoFileBean.file" style="width:315px;"/>
								<s:if test='themeBean.thLogo != null && themeBean.thLogo != ""'>
									<br/><img src="<%=path %><s:property value="themeBean.thLogo"/>" alt="" />
								</s:if>
							</td>
						</tr>
						<tr id="tr-condition">
							<td width="15%" class="field-title">网站背景图: </td>
							<td width="85%" class="field-content" colspan="3">
								<input type="file" name="bgFileBean.file" style="width:315px;"/>
								<s:if test='themeBean.thBgImg != null && themeBean.thBgImg != ""'>
									<br/><img src="<%=path %><s:property value="themeBean.thBgImg"/>" alt="" />
								</s:if>
							</td>
						</tr>
					</table>
					<div id="div-button" align="center">
						<s:if test='#request.method != "update"'>
							<input type="button" value="创建模板，设置首页 " onclick="submitTheme();"/>
						</s:if>
						<s:else>
							<input type="button" value="修改模板" onclick="submitTheme();"/>
							<input type="button" value="返　　回" onclick="goBack();" style="margin-left:10px;"/>
						</s:else>
					</div>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>